package com.athuahua.spzx.service;

import com.athuahua.spzx.dto.product.SkuSaleDto;
import com.athuahua.spzx.entity.ProductSku;
import com.athuahua.spzx.vo.ProductSkuVo;
import com.athuahua.spzx.dto.h5.ProductSkuDto;
import com.athuahua.spzx.entity.Product;
import com.athuahua.spzx.vo.h5.ProductItemVo;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
* @author huahua
* @description 针对表【product(商品)】的数据库操作Service
* @createDate 2024-08-12 16:43:01
*/
public interface ProductService extends IService<Product> {

    /**
     * 获取商品sku列表
     * @param page
     * @param limit
     * @param productSkuDto
     * @return
     */
    IPage<ProductSkuVo> PageInfo(Integer page, Integer limit, ProductSkuDto productSkuDto);

    /**
     * 获取商品详情
     * @param skuId
     * @return
     */
    ProductItemVo item(Long skuId);

    /**
     * 根据skuId获取商品sku
     * @param skuId
     * @return
     */
    ProductSku getBySkuId(Long skuId);

    /**
     * 更新sku商品数量
     * @param skuSaleDtoList
     * @return
     */
    Boolean updateSkuSaleNum(List<SkuSaleDto> skuSaleDtoList);
}
